﻿using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;
using NServiceBus;
using System;


namespace Client
{
	class Program
	{
		static void Main(string[] args)
		{
			// Resolve sample endpoint using IOC
			var _container = new WindsorContainer(new XmlInterpreter());

			Configure.With()
				.CastleWindsorBuilder(_container)               
				.XmlSerializer()               
				.MsmqTransport()                     
					.IsTransactional(true)                     
					.PurgeOnStartup(false)                 
				.UnicastBus()                     
					.ImpersonateSender(false)                 
				.CreateBus()                 
				.Start();

			var _client = _container.Resolve<Client.MyClient>();

			_client.Run();
		}
	}
}
